import request from "@/config/axios";

// AI 音乐 API
export const VideoApi = {
  // 查询音乐分页
  getVideoPage: async (params) => {
    return await request.get({ url: `/ai/video/my-page`, params });
  },

  // 查询音乐状态
  refreshVideoStatus: async (ids) => {
    return await request.get({
      url: `/ai/video/my-list-by-ids`,
      params: { ids: ids.join(",") },
    });
  },

  // 音乐生成
  createVideo: async (data) => {
    return await request.post({ url: `/ai/video/generate`, data });
  },

  // 更新音乐
  updateVideo: async (data) => {
    return await request.put({ url: "/ai/video/update", data });
  },

  // 删除音乐
  deleteVideo: async (id) => {
    return await request.delete({ url: `/ai/video/delete-my?id=` + id });
  },
};